package com.yl.pattern.behavioralmodel.strategy;

/**
 * @Author 小羊
 * @Date 31/10/2024下午 3:50
 * @ClassName SalesMan
 * @Description 销售员（环境角色类）
 */
public class SalesMan {
    /**
     * 聚合策略类
     */
    private Strategy strategy;

    public SalesMan(Strategy strategy) {
        this.strategy = strategy;
    }

    public Strategy getStrategy() {
        return strategy;
    }

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    /**
     * 向客户展示促销活动
     */
    public void salesManShow(){
        strategy.show();
    }
}
